package com.unitd.base.module.logistics.po;

import com.unitd.base.frame.plugins.module.model.MybatisBaseEntity;
import lombok.*;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
* 物流详细信息表信息实体对象
* @filename ExpressDetail.java
* @copyright www.unitd.com
* @author Hudan
* @version 1.0
* @date 2019-01-31
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "EXPRESS_DETAIL")
public class ExpressDetail extends MybatisBaseEntity {

	/** 快递公司编号, 与EXPRESS_COMPANY表中的code对应起来 */
	@Column(name = "EXPRESS_COMPANY")
	private String expressCompany;
	/** 快递单号 */
	@Column(name = "EXPRESS_NO")
	private String expressNo;
	/** 物流轨迹详情信息 */
	@Column(name = "EXPRESS_DATA")
	private String expressData;
	/** 物流状态(-1未查到快递信息、0在途中、1已揽收、2疑难、3已签收、4退签、5同城派送中、6退回、7转单) */
	@Column(name = "STATE")
	private String state;
	@Transient
	private List<ExpressData> expressDataArray;

	public ExpressDetail(String expressCompany, String expressNo) {
		this.expressCompany = expressCompany;
		this.expressNo = expressNo;
	}
}